function request(num) {
    return new Promise(resolve => {
        setTimeout(() => {
            // resolve(num *2)
        }, 1000)
    })
}

// request(1).then(res1 => {
//     console.log(res1);

//     request(2).then
// })

async function fn() {
    const res1 = await request(5)
    const res2 = await request(res1)
    console.log(res2);
}


async function fn() {
    await request(5)
    await request(res1)
    console.log(res2);
}

fn()